﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SolutionBLL;
using SolutionModel;
using SFast;

public partial class admin_left : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        BindMenuList(0, 0);
    }


    public void BindMenuList(int MinDepth, int MaxDepth)
    {
        T_MenuBLL bll = new T_MenuBLL();
        
        //List<T_Menus> list = bll.GetTree(MinDepth, MaxDepth);
        MyUserLogin ul = new MyUserLogin();

        List<T_Menu> list = bll.getMenuByUsesrID(ul.UserID);
        list.ForEach(o =>
        {
            if (!string.IsNullOrEmpty(o.C_Url))
            {
                o.C_Url = MyUrl.ToAb("~" + o.C_Url);
            }
            else
            {
                o.C_Url = " javascript:void(0)";
            }
        });

        rpTreeList.DataSource = list;
        rpTreeList.DataBind();
    }



}